package com.jams.goodox.adapter.viewHolder;

import android.content.Context;
import android.view.View;

import com.bigkoo.convenientbanner.holder.Holder;
import com.facebook.drawee.view.SimpleDraweeView;
import com.jams.library.fresco.FrescoUtil;

/**
 * Created by guozhen.hou on 2017/7/24.
 */

public class StringBannerViewHolder implements Holder<String> {
    private SimpleDraweeView imageView;

    @Override
    public View createView(Context context) {
        // 你可以通过layout文件来创建，也可以像我一样用代码创建，不一定是Image，任何控件都可以进行翻页
        imageView = new SimpleDraweeView(context);
        imageView.setScaleType(SimpleDraweeView.ScaleType.FIT_XY);
        return imageView;
    }

    @Override
    public void UpdateUI(Context context, int position, String data) {
        FrescoUtil.loadNetUrl(imageView,data);
    }
}
